package cn.wgx.modules.sys.entity;

import cn.wgx.modules.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;

/**
 * Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
 * Description:
 * 
 *
 * @author 
 */
public class SysRes extends BaseEntity implements Serializable {
    /**
     * 共享资源库id
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private Integer resource_id;

    /**
     * 原始文件名
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String originalName;

    /**
     * 文件后缀
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String suffix;

    /**
     * 文件大小
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private Long size;

    /**
     * 文件URL地址(相对地址)
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String url;

    /**
     * A文件类型(0 3D, 1 2D, 2 VIDEO, 3 AUDIO)
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String type;

    /**
     * 上传来源
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String comeFrom;

    /**
     * IP地址
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String address;

    /**
     * 代理浏览器
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String agent;

    /**
     * 是否使用过
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private Boolean used;

    /**
     * MD5值
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private String md5;

    /**
     * 上传时间
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private Date createDate;

    /**
     * 创建人
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private Integer createUserId;

    /**
     * 更新时间
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private Date updateDate;

    /**
     * 更新人
     *
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private Integer updateUserId;

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method returns the value of the database column education..sys_res.resource_id
     *
     * @return the value of education..sys_res.resource_id
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public Integer getResource_id() {
        return resource_id;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withResource_id(Integer resource_id) {
        this.setResource_id(resource_id);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.resource_id
     *
     * @param resource_id the value for education..sys_res.resource_id
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setResource_id(Integer resource_id) {
        this.resource_id = resource_id;
    }

    /**
     * This method returns the value of the database column education..sys_res.OriginalName
     *
     * @return the value of education..sys_res.OriginalName
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getOriginalName() {
        return originalName;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withOriginalName(String originalName) {
        this.setOriginalName(originalName);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.OriginalName
     *
     * @param originalName the value for education..sys_res.OriginalName
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setOriginalName(String originalName) {
        this.originalName = originalName;
    }

    /**
     * This method returns the value of the database column education..sys_res.suffix
     *
     * @return the value of education..sys_res.suffix
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getSuffix() {
        return suffix;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withSuffix(String suffix) {
        this.setSuffix(suffix);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.suffix
     *
     * @param suffix the value for education..sys_res.suffix
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    /**
     * This method returns the value of the database column education..sys_res.size
     *
     * @return the value of education..sys_res.size
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public Long getSize() {
        return size;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withSize(Long size) {
        this.setSize(size);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.size
     *
     * @param size the value for education..sys_res.size
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setSize(Long size) {
        this.size = size;
    }

    /**
     * This method returns the value of the database column education..sys_res.url
     *
     * @return the value of education..sys_res.url
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getUrl() {
        return url;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withUrl(String url) {
        this.setUrl(url);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.url
     *
     * @param url the value for education..sys_res.url
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * This method returns the value of the database column education..sys_res.type
     *
     * @return the value of education..sys_res.type
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getType() {
        return type;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withType(String type) {
        this.setType(type);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.type
     *
     * @param type the value for education..sys_res.type
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * This method returns the value of the database column education..sys_res.comeFrom
     *
     * @return the value of education..sys_res.comeFrom
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getComeFrom() {
        return comeFrom;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withComeFrom(String comeFrom) {
        this.setComeFrom(comeFrom);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.comeFrom
     *
     * @param comeFrom the value for education..sys_res.comeFrom
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setComeFrom(String comeFrom) {
        this.comeFrom = comeFrom;
    }

    /**
     * This method returns the value of the database column education..sys_res.address
     *
     * @return the value of education..sys_res.address
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getAddress() {
        return address;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withAddress(String address) {
        this.setAddress(address);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.address
     *
     * @param address the value for education..sys_res.address
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * This method returns the value of the database column education..sys_res.agent
     *
     * @return the value of education..sys_res.agent
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getAgent() {
        return agent;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withAgent(String agent) {
        this.setAgent(agent);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.agent
     *
     * @param agent the value for education..sys_res.agent
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setAgent(String agent) {
        this.agent = agent;
    }

    /**
     * This method returns the value of the database column education..sys_res.used
     *
     * @return the value of education..sys_res.used
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public Boolean getUsed() {
        return used;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withUsed(Boolean used) {
        this.setUsed(used);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.used
     *
     * @param used the value for education..sys_res.used
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setUsed(Boolean used) {
        this.used = used;
    }

    /**
     * This method returns the value of the database column education..sys_res.md5
     *
     * @return the value of education..sys_res.md5
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public String getMd5() {
        return md5;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withMd5(String md5) {
        this.setMd5(md5);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.md5
     *
     * @param md5 the value for education..sys_res.md5
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setMd5(String md5) {
        this.md5 = md5;
    }

    /**
     * This method returns the value of the database column education..sys_res.createDate
     *
     * @return the value of education..sys_res.createDate
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withCreateDate(Date createDate) {
        this.setCreateDate(createDate);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.createDate
     *
     * @param createDate the value for education..sys_res.createDate
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * This method returns the value of the database column education..sys_res.createUserId
     *
     * @return the value of education..sys_res.createUserId
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public Integer getCreateUserId() {
        return createUserId;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withCreateUserId(Integer createUserId) {
        this.setCreateUserId(createUserId);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.createUserId
     *
     * @param createUserId the value for education..sys_res.createUserId
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * This method returns the value of the database column education..sys_res.updateDate
     *
     * @return the value of education..sys_res.updateDate
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withUpdateDate(Date updateDate) {
        this.setUpdateDate(updateDate);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.updateDate
     *
     * @param updateDate the value for education..sys_res.updateDate
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * This method returns the value of the database column education..sys_res.updateUserId
     *
     * @return the value of education..sys_res.updateUserId
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public Integer getUpdateUserId() {
        return updateUserId;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public SysRes withUpdateUserId(Integer updateUserId) {
        this.setUpdateUserId(updateUserId);
        return this;
    }

    /**
     * This method sets the value of the database column education..sys_res.updateUserId
     *
     * @param updateUserId the value for education..sys_res.updateUserId
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", resource_id=").append(resource_id);
        sb.append(", originalName=").append(originalName);
        sb.append(", suffix=").append(suffix);
        sb.append(", size=").append(size);
        sb.append(", url=").append(url);
        sb.append(", type=").append(type);
        sb.append(", comeFrom=").append(comeFrom);
        sb.append(", address=").append(address);
        sb.append(", agent=").append(agent);
        sb.append(", used=").append(used);
        sb.append(", md5=").append(md5);
        sb.append(", createDate=").append(createDate);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", updateUserId=").append(updateUserId);
        sb.append("]");
        return sb.toString();
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRes other = (SysRes) that;
        return (this.getResource_id() == null ? other.getResource_id() == null : this.getResource_id().equals(other.getResource_id()))
            && (this.getOriginalName() == null ? other.getOriginalName() == null : this.getOriginalName().equals(other.getOriginalName()))
            && (this.getSuffix() == null ? other.getSuffix() == null : this.getSuffix().equals(other.getSuffix()))
            && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
            && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getComeFrom() == null ? other.getComeFrom() == null : this.getComeFrom().equals(other.getComeFrom()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getAgent() == null ? other.getAgent() == null : this.getAgent().equals(other.getAgent()))
            && (this.getUsed() == null ? other.getUsed() == null : this.getUsed().equals(other.getUsed()))
            && (this.getMd5() == null ? other.getMd5() == null : this.getMd5().equals(other.getMd5()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()));
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getResource_id() == null) ? 0 : getResource_id().hashCode());
        result = prime * result + ((getOriginalName() == null) ? 0 : getOriginalName().hashCode());
        result = prime * result + ((getSuffix() == null) ? 0 : getSuffix().hashCode());
        result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode());
        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getComeFrom() == null) ? 0 : getComeFrom().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getAgent() == null) ? 0 : getAgent().hashCode());
        result = prime * result + ((getUsed() == null) ? 0 : getUsed().hashCode());
        result = prime * result + ((getMd5() == null) ? 0 : getMd5().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
        return result;
    }

    /**
     *
     * @mbg.generated Fri Apr 17 14:55:57 CST 2020
     */
    public enum Column {
        resource_id("resource_id", "resource_id", "INTEGER", false),
        originalName("OriginalName", "originalName", "VARCHAR", false),
        suffix("suffix", "suffix", "VARCHAR", false),
        size("size", "size", "BIGINT", false),
        url("url", "url", "VARCHAR", false),
        type("type", "type", "VARCHAR", false),
        comeFrom("comeFrom", "comeFrom", "VARCHAR", false),
        address("address", "address", "VARCHAR", false),
        agent("agent", "agent", "VARCHAR", false),
        used("used", "used", "BIT", false),
        md5("md5", "md5", "VARCHAR", false),
        createDate("createDate", "createDate", "TIMESTAMP", false),
        createUserId("createUserId", "createUserId", "INTEGER", false),
        updateDate("updateDate", "updateDate", "TIMESTAMP", false),
        updateUserId("updateUserId", "updateUserId", "INTEGER", false);

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        private static final String BEGINNING_DELIMITER = "\"";

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        private static final String ENDING_DELIMITER = "\"";

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        private final String column;

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        private final boolean isColumnNameDelimited;

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        private final String javaProperty;

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        private final String jdbcType;

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public String value() {
            return this.column;
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public String getValue() {
            return this.column;
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public String getJavaProperty() {
            return this.javaProperty;
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public String getJdbcType() {
            return this.jdbcType;
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        /**
         *
         * @mbg.generated Fri Apr 17 14:55:57 CST 2020
         */
        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}